package com.naiterui.ehp.bs.recommend.bean;


import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.*;

import lombok.Data;

@Data
@Table(name = "recom_audit_log")
@Entity
public class RecomAuditLog implements Serializable {

  /**
   * 审核状态-待审核
   */
  public static final int AUDIT_STATUS_PENDING = 0;
  /**
   * 审核状态-通过
   */
  public static final int AUDIT_STATUS_PASS = 1;
  /**
   * 审核状态-不通过
   */
  public static final int AUDIT_STATUS_REJECT = 2;
  /**
   * 审核状态-已失效
   */
  public static final int AUDIT_STATUS_EXPIRED = 3;

  /**
   * 初审审核状态-待审核
   */
  public static final int PRE_AUDIT_STATUS_PENDING = 0;
  /**
   * 初审审核状态-通过
   */
  public static final int PRE_AUDIT_STATUS_PASS = 1;
  /**
   * 初审审核状态-不通过
   */
  public static final int PRE_AUDIT_STATUS_REJECT = 2;

  /**
   * 审核类型 - 系统
   */
  public static final int AUDIT_TYPE_SYSTEM = 1;
  /**
   * 审核类型 - 人工
   */
  public static final int AUDIT_TYPE_ARTIFICIAL = 2;

  private static final long serialVersionUID = -3424549644643047353L;


  /**
   * 主键
   */
  @Id
  @GeneratedValue(strategy = IDENTITY)
  @Column(name = "id", unique = true, nullable = false)
  private Long id;

  /**
   * 处方ID
   */
  @Column(name = "recom_id")
  private Long recomId;

  /**
   * 处方编号
   */
  @Column(name = "serial_number")
  private String serialNumber;

  /**
   * 医生ID
   */
  @Column(name = "doctor_id")
  private Long doctorId;

  /**
   * 医生姓名
   */
  @Column(name = "doctor_name")
  private String doctorName;

  /**
   * 患者ID
   */
  @Column(name = "patient_id")
  private Long patientId;

  /**
   * 患者姓名
   */
  @Column(name = "patient_name")
  private String patientName;

  /**
   * 审核状态(0:待审核,1:通过,2:不通过，3：已失效)
   */
  @Column(name = "status")
  private Integer status;

  /**
   * 审核类型(1:系统,2:人工)
   */
  @Column(name = "audit_type")
  private Integer auditType;

  /**
   * 审核备注
   */
  @Column(name = "remark")
  private String remark;

  /**
   * 初审状态（0:待审核, 1:通过, 2:不通过）
   */
  @Column(name = "pre_audit_status")
  private Integer preAuditStatus;

  /**
   * 初审药师ID
   */
  @Column(name = "pre_pharmacist_id")
  private Long prePharmacistId;

  /**
   * 初审药师姓名
   */
  @Column(name = "pre_pharmacist_name")
  private String prePharmacistName;

  /**
   * 初审时间
   */
  @Column(name = "pre_audit_time")
  private Date preAuditTime;

  /**
   * 审核药师ID
   */
  @Column(name = "pharmacist_id")
  private Long pharmacistId;

  /**
   * 审核药师姓名
   */
  @Column(name = "pharmacist_name")
  private String pharmacistName;

  /**
   * 创建时间
   */
  @Column(name = "created_at")
  private Date createdAt;

  /**
   * 创建人
   */
  @Column(name = "created_by")
  private String createdBy;

  /**
   * 修改时间
   */
  @Column(name = "changed_at")
  private Date changedAt;

  /**
   * 修改人
   */
  @Column(name = "changed_by")
  private String changedBy;

  /**
   * 乐观锁
   */
  @Version
  private Integer version;

}

